package oop.day03;


public abstract class Animal
{
    String name;
    int age;
    String color;
    Animal() {}
    Animal(String name,int age,String color)
    {
        this.name=  name;
        this.age= age;
        this.color = color;
    }


    void drink()
    {
        System.out.println(" there is a " + color +" and "+ color + " name is" + name +" 's animal drinking");
    }
    abstract void eat();
}



class Dog extends Animal implements Swim
{
    Dog(){};
    Dog(String name,int age,String color)
    {
        super(name,age,color);
    }
    void lookHome()
    {
        System.out.println("there is a dog "+ age + " years old " + " with " + color +" fur " + " looking home" );
    }
    void eat()
    {
        System.out.println("there is a dog " + age + " years old with " + color + " fur eating bone");
    }

    public void swim()
    {
        System.out.println(" there is a colored "+ color + age + " years old ,named  " + name + "  swimming");
    }
}


class Chick extends Animal
{
    Chick() {};
    Chick(String name, int age, String color)
    {
        super(name, age, color);
    }

    void layEggs()
    {
        System.out.println("there is a chick that with   " + color + " color fur and   " + age + " years old name is  " + name+ "  is laying egg");
    }

    void eat()
    {
        System.out.println("there is a chick" + "that with  " + color + "  color fur and  " + age + "  years old name is  " + name+ "  is eating");
    }


}


class Fish extends Animal implements Swim
{
    Fish(){};
    Fish(String name,int age,String color)
    {
        super(name,age,color);
    }

    void eat()
    {
        System.out.println(" there is a  " + age + "  years old "+ " with " + color + " and It's name is "+name + " 'fish eating" );
    }

    public void swim()
    {
        System.out.println(" there is a colored " + color + age + "  years old , named "+name + " fish swimming");
    }


}